@import "./variables.module.scss";
@import "./mixin.scss";
@import "./transition.scss";
@import "./element-ui.scss";
@import "./sidebar.scss";

body {
    height: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: "Hiragino Sans GB", "Source Han Sans CN", "Microsoft YaHei", "微软雅黑", Arials, ans-serif;
}

label {
    font-weight: 700;
}

html {
    height: 100%;
    box-sizing: border-box;
}

.el-textarea__inner {
    resize: none;
}

#app {
    height: 100%;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

a:focus,
a:active {
    outline: none;
}

a,
a:focus,
a:hover {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

div:focus {
    outline: none;
}

.clearfix {
    &:after {
        visibility: hidden;
        display: block;
        font-size: 0;
        content: " ";
        clear: both;
        height: 0;
    }
}

.app-container {
    padding: 20px;
}

*,
p {
    margin: 0;
    padding: 0;
}

html,
body,
#app,
.el-container {
    height: 100%;
    overflow: hidden;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 10px;
}

*::-webkit-scrollbar-thumb {
    border-radius: 4px;
    width: 10px;
    background: #dae1e9;
}

*::-webkit-scrollbar-thumb:hover {
    background: #cfd9e3;
}

*::-webkit-scrollbar-thumb:focus {
    background: #b7c1c9;
}

*::-webkit-scrollbar-track {
    border-radius: 10px;
    background: transparent;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

.ml20 {
    margin-left: 20px;
}

.mr20 {
    margin-right: 20px;
}

.mt20 {
    margin-top: 20px;
}

.mb20 {
    margin-bottom: 20px;
}

.robotAside {
    background: #fff;
    border-radius: 20px;
    margin-right: 20px;
}

.robotMain {
    background: #fff;
    border-radius: 20px;
}

.knowledge-container {
    display: flex;
    height: 100%;

    overflow: hidden;
    .container {
        width: 100%;
        padding: 0 0px 0px 10px;
        flex: 1;
    }
    .calcwidth {
        width: calc(100% - 270px) !important;
        flex: none;
    }
}

.knowledgeManage .el-scrollbar__wrap,
.knowledgeTree .el-scrollbar__wrap {
    overflow-x: hidden;
}

.vue-treeselect {
    line-height: 32px;
    .vue-treeselect__control {
        height: 32px;
        border-radius: 4px;
    }
}

.flexbetween {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.treeContent {
    width: 260px;
    background: #f5f7fa;
    border-radius: 6px;
    margin-right: 10px;
    padding-left: 20px;
    flex-shrink: 0;
    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 20px 20px 0;
        > span {
            color: #363c43;
            font-size: 16px;
            font-weight: bold;
        }
    }
    .knowledgeTree {
        height: calc(100% - 70px);
    }
    .el-tree {
        background: #f5f7fa;
    }
}

.el-form-item__content {
    .edui-default {
        line-height: 20px;
    }
    .iconfont {
        font-size: 24px;
        color: #b7c1c9;
        cursor: pointer;
        &:hover {
            color: #abb4bc;
        }
    }
}

.ant-message {
    z-index: 9999999 !important;
    .ant-message-notice-content {
        border-radius: 50px;
        padding: 0 80px;
        height: 60px;
        line-height: 60px;
        box-shadow: 0px 3px 15px 0px rgba(102, 112, 123, 0.3);
        span {
            font-size: 16px;
            color: #676e75;
        }
    }
}

.ant-select {
    .ant-select-selection__rendered {
        margin-left: 16px;
    }
}

.ant-select-dropdown {
    z-index: 99999 !important;
}

.ant-select-selection--single {
    height: 34px;
    border-radius: 6px;
}

.ant-select-dropdown {
    border-radius: 6px;
    box-shadow: 0px 0px 15px 0px #e1e9f1;
}

.ant-select-tree-checkbox-checked::after {
    border: none;
}

.ant-select-tree-checkbox-inner::after {
    display: none;
}

.ant-select-open .ant-select-selection,
.ant-select-selection:hover,
.ant-select-selection:focus {
    box-shadow: none;
}

.ant-select-selection--multiple {
    min-height: 34px;
    border-radius: 6px;
    .ant-select-selection__rendered {
        margin: 0 20px -3px 16px;
        & > ul > li {
            margin-top: 4px;
        }
    }
    .ant-select-selection__choice {
        border-radius: 20px;
        height: 26px;
        background: #eaeef4;
        margin-right: 10px;
        font-size: 14px;
        color: #676e75;
    }
    .ant-select-selection__choice__remove {
        font-size: 14px !important;
    }
    .ant-select-selection__choice__content {
        margin-right: 6px;
    }
}

.ant-select-tree {
    li {
        margin: 5px 0;
        .ant-select-tree-node-content-wrapper {
            height: 34px;
            line-height: 25px;
            padding-left: 5px;
            &:hover,
            &.ant-select-tree-node-selected {
                background-color: #f5f7fa;
            }
        }
    }
}

.ant-select-dropdown-menu-item {
    font-weight: normal !important;
    color: #676e75 !important;
}

.ant-select-dropdown {
    .ant-select-switcher-icon {
        font-size: 16px !important;
        color: #90979d;
    }
}

.ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled),
.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled),
.ant-select-dropdown-menu-item-selected {
    background: #f5f7fa;
}

.singleSelect {
    .ant-select-tree-switcher {
        position: relative;
    }
    .ant-select-tree-switcher_open::before,
    .ant-select-tree-switcher_close::before {
        content: "";
        position: absolute;
        right: -680px;
        top: 0;
        left: 0;
        bottom: 0;
    }
}

.header {
    .el-dropdown {
        .el-dropdown-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 34px;
            line-height: 34px;
            border: 1px solid #dae1e9;
            border-radius: 6px;
            padding: 0 10px 0 15px;
            color: #606266;
            cursor: pointer;
            .el-icon-arrow-down {
                color: #c0c4cc;
            }
        }
    }
    .el-input--suffix {
        & > .el-input__suffix {
            top: 1px;
        }
    }
    .el-input-group {
        & > .el-input__suffix {
            top: 6px;
        }
    }
    .el-select--small {
        .el-input__suffix {
            top: 0px;
        }
    }
    .el-input .el-input__inner {
        padding-right: 40px;
    }
    .icon-sousuo {
        font-size: 22px;
        color: #b7c1c9;
        margin-right: 8px;
        cursor: pointer;
        &:hover {
            color: #abb4bc;
        }
    }
    .iconBtn .iconfont {
        font-size: 24px;
        color: #b7c1c9;
        background: #f5f7fa;
        border-radius: 6px;
        padding: 5px;
        cursor: pointer;
        margin-left: 20px;
        &:hover {
            background: #eaeef4;
            color: #abb4bc;
        }
    }
}

.treeLine {
    .el-tree--highlight-current > .el-tree-node {
        padding-left: 0;
    }
    .el-tree > .el-tree-node:after {
        border-top: none;
    }
    .el-tree-node {
        position: relative;
        padding-left: 12px;
    }
    //节点有间隙，隐藏掉展开按钮就好了,如果觉得空隙没事可以删掉
    .el-tree-node__expand-icon.is-leaf {
        display: none;
    }
    .el-tree-node__children {
        padding-left: 16px;
    }

    .el-tree-node :last-child:before {
        height: 34px;
    }

    .el-tree > .el-tree-node:before {
        border-left: none;
    }

    .el-tree > .el-tree-node:after {
        border-top: none;
    }

    .el-tree-node:before {
        content: "";
        left: -4px;
        position: absolute;
        right: auto;
        border-width: 1px;
    }

    .el-tree-node:after {
        content: "";
        left: -4px;
        position: absolute;
        right: auto;
        border-width: 1px;
    }

    .el-tree-node:before {
        border-left: 1px dashed #dae1e9;
        bottom: 0px;
        height: 100%;
        top: -26px;
        width: 1px;
    }

    .el-tree-node:after {
        border-top: 1px dashed #dae1e9;
        height: 20px;
        top: 16px;
        width: 18px;
    }
}

.filterDialog {
    position: fixed;
    top: 210px;
    right: 35px;
    width: 680px;
    height: 250px;
    background: #fff;
    border-radius: 4px;
    padding: 60px 20px 0 30px;
    box-shadow: 0px 3px 15px 0px rgba(102, 112, 123, 0.2);
    z-index: 99;
    .searchBox {
        .searchItem {
            display: inline-block;
            margin-bottom: 20px;
            > span {
                display: inline-block;
                width: 90px;
                text-align: right;
                color: #363c43;
                margin-right: 10px;
            }
            > div {
                width: 220px;
            }
            &:nth-child(odd) {
                margin-right: 20px;
                > span {
                    width: 60px;
                }
            }
        }
    }
    .footer {
        position: absolute;
        right: 20px;
        bottom: 20px;
        button {
            margin-left: 20px;
        }
        .el-button--text {
            padding-left: 20px;
            padding-right: 20px;
            color: #676e75;
            font-size: 14px;
            &:hover {
                background: #f5f7fa;
            }
            &:focus {
                background: #eaeef4;
            }
        }
    }
}

.el-drawer.rtl {
    top: 80px !important;
    height: calc(100% - 100px) !important;
    box-shadow: none !important;
    background-color: transparent !important;
    .el-drawer__header {
        padding: 0;
        height: 60px;
        background: #fff;
        margin-bottom: 0;
        margin-left: 10px;
        box-shadow: -1px 0 10px rgb(0 0 0 / 15%);
        border-radius: 50px 0 0 50px;
        .close {
            display: inline-block;
            height: 60px;
            line-height: 60px;
            color: #b7c1c9;
            font-size: 24px;
            padding: 0 20px 0 25px;
            cursor: pointer;
            &:hover {
                color: #abb4bc;
            }
        }
        .title {
            line-height: 60px;
            font-size: 16px;
            color: #363c43;
        }
    }
    .el-drawer__body {
        position: relative;
        margin-left: 65px;
        box-shadow: -2px 15px 15px 0px rgb(102 112 123 / 30%);
        background: #fff;
    }
}

.animate__fadeIn,
.animate__fadeOut {
    --animate-duration: 0.5s;
    --animate-delay: 0s;
}

.robotChatLog {
    .chatDataList {
        overflow-y: scroll;
        .chatDataItem {
            padding: 0;
            margin-bottom: 10px;
            .time {
                text-align: center;
                color: #90979d;
            }
            .visitor-msg {
                margin-top: 10px;
                display: flex;
                justify-content: flex-end;
                .msg {
                    color: #fff;
                    background: #6b5ee2;
                    padding: 10px 20px;
                    border-radius: 20px 20px 0px 20px;
                    margin-right: 15px;
                    max-width: 50%;
                    word-break: break-all;
                }
                img {
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                }
            }
            .robot-msg {
                margin: 20px 0;
                display: flex;
                align-items: flex-start;
                .robotAvatarUrl {
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                    margin-right: 8px;
                    flex-shrink: 0;
                }
                .icontx {
                    font-size: 45px;
                    line-height: 45px;
                    color: #b7c1c9;
                    flex-shrink: 0;
                }
                .msg-content {
                    max-width: 50%;
                }
                .msg {
                    background: #f0f3f7;
                    padding: 10px 20px 10px;
                    color: #363c43;
                    max-width: 100%;
                    border-radius: 20px 20px 20px 0px;
                    word-break: break-all;
                    margin-left: 5px;
                    display: inline-block;
                    img {
                        max-width: 100%;
                    }
                    video {
                        width: 400px;
                    }
                    &.notbg {
                        padding: 0;
                        background: transparent;
                    }
                }
                .graphics {
                    .graphicsItem {
                        position: relative;
                        width: 250px;
                        height: 125px;
                        cursor: pointer;
                        img {
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                        }
                        .title {
                            position: absolute;
                            bottom: 0px;
                            left: 0px;
                            color: #fff;
                            background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
                            height: 30px;
                            line-height: 30px;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            white-space: nowrap;
                            width: 100%;
                            padding-left: 10px;
                        }
                    }
                }
                .robotRec {
                    width: 330px;
                    padding: 15px 20px 20px;
                    border-radius: 20px;
                    background: #f0f3f7;
                    &.msgRec {
                        margin-top: 20px;
                    }
                    .preDesc {
                        color: #363c43;
                        margin-bottom: 20px;
                    }
                    .aftDesc {
                        color: #90979d;
                        margin-top: 20px;
                    }
                    .recQuestion {
                        color: #6b5ee2;
                        height: 40px;
                        line-height: 40px;
                        text-align: center;
                        border-radius: 6px;
                        background: #fff;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        padding: 0 10px;
                        margin-top: 15px;
                        cursor: pointer;
                    }
                    .wxQuestion {
                        > p {
                            color: #6b5ee2;
                            white-space: nowrap;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            margin-bottom: 20px;
                            &:last-child {
                                margin-bottom: 0;
                            }
                        }
                    }
                }
            }
        }
    }
    &.chatLogList {
        .visitor-msg {
            flex-direction: row-reverse;
            align-items: start;
            > .icontx {
                font-size: 45px;
                line-height: 45px;
                color: #b7c1c9;
                flex-shrink: 0;
            }
            .msg {
                margin-left: 10px;
                border-radius: 20px 20px 20px 0px !important;
            }
        }
        .robot-msg {
            flex-direction: row-reverse;
            .msg-content {
                text-align: right;
            }
            > img {
                width: 40px;
                height: 40px;
                border-radius: 50%;
            }
            .msg {
                text-align: left;
                margin-right: 10px;
                border-radius: 20px 20px 0px 20px !important;
            }
            .robotRec {
                margin-right: 10px;
                .preDesc,
                .aftDesc {
                    text-align: left;
                }
            }
        }
    }
}

.register,
.resetPassword {
    .el-steps {
        margin-bottom: 35px;
        .el-step__head {
            height: 60px;
            &::after {
                content: "";
                position: absolute;
                top: 0;
                left: 50%;
                transform: translateX(-50%);
                border: 1px solid #dae1e9;
                border-radius: 50%;
                display: inline-block;
                width: 60px;
                height: 60px;
                z-index: 0;
                background: #fff;
            }
        }
        .el-step__head.is-process,
        .el-step__head.is-success {
            .el-step__icon {
                border-color: #6b5ee2;
                background: #6b5ee2;
            }
            &::after {
                border-color: #6b5ee2;
            }
        }
        .el-step__icon {
            width: 50px;
            height: 50px;
            background: #dae1e9;
            border: 1px solid #dae1e9;
            margin-top: 5px;
            .el-step__icon-inner {
                font-size: 22px;
                color: #fff;
                font-weight: bold;
            }
        }
        .el-step__title {
            margin-top: 10px;
            font-size: 14px;
            line-height: 18px;
            color: #90979d !important;
            font-weight: normal;
        }
        .el-step__line {
            top: 30px !important;
            height: 1px;
            background-color: #dae1e9 !important;
            .el-step__line-inner {
                border-color: #dae1e9 !important;
            }
        }
        .is-success {
            .el-step__line {
                background-color: #6b5ee2 !important;
                .el-step__line-inner {
                    border-color: #6b5ee2 !important;
                }
            }
        }
    }
}

.tox-dialog__body-nav {
    display: none !important;
}

.viewer-container {
    z-index: 9999 !important;
}

::selection {
    background: #1479f0 !important;
}

::-moz-selection {
    background: #1479f0 !important;
}

::-webkit-selection {
    background: #1479f0 !important;
}
